The present invention relates to a data recording and reading system for use with a recording medium having a plurality of fixed length recording units, which system is particularly suitable for recording variable length data.
Optical disk devices have been developed recently as information recording devices of large capacity in which data is recorded, erased and reproduced by means of magnetooptical interaction between heating by a laser beam and a magnetic field. The medium of an optical disk device usually adopts fixed length recording units. As a recording method for such a fixed length recording unit, there is known a sector system which is used especially for a small sized magnetic disk device. As is well known, a sector is composed of an ID field and a data field. A track number and a sector number are recorded in the ID field, and data is recorded in the data field. It is common that data for the ID field of an optical disk medium is recorded in advance, such as at the time of manufacture of the disk.
U.S. Ser. No. 847,167 filed on April 2, 1986 now U.S. Pat. No. 4,760,566 discloses a data recording system in which a flag together with the above-described track number and sector number is provided at each sector, the flag indicating if data has been recorded in the sector or not.
Similar to a magnetic disk device, an optical disk device sometimes records one block of data in a plurality of sectors. As a recording method capable of correlating a plurality of sectors with a block, a method is disclosed in Japanese Patent Publication No. JP-A-53-110510 in which each one of a start sector, one or more intermediate sectors and a last sector has a flag identifying the start, intermediate and last sectors in the data field thereof.
According to this method, as shown in FIG. 3, each sector 1 has a flag field 2 and a data field 4 and the sectors are separated by a gap field 5. In the case shown in FIG. 3, one block of data is recorded divisionally in three sectors 1. One block of data divisionally recorded in three sectors is continuously read in response to a single read instruction. The length of the read-out data is equal to three times the sector length less three times the flag field length.
This method, however, requires that the total data length be an integer multiple of the data length recorded in a sector. If not, one block terminates at and intermediate part of a sector. Thus, the end of the block cannot be identified by the read-out data, i.e., it is not certain to what extent the effective data continues. In such a case, it is possible to discriminate the boundary of the end of the effective data and the data empty field by means of processing the read-out data by a CPU. However, this results in a corresponding load on the CPU. Apart from the above, if a plurality of blocks each having a short data length are recorded in one sector, it becomes difficult to read an arbitrary block in the sector because the reading is carried out in units of a sector. Thus, the above-described prior art poses a difficulty of dealing with data having an arbitrary length.